#include<iostream>
#include<algorithm>
#define int long long
#define x first
#define y second
using namespace std;
const int N = 1e5 + 10;
int a[N];
int b[N];
typedef pair<int,int> PII;
PII p[N];
void solve()
{
    int ans = 0;
    int n;
    cin >> n;
    for(int i = 1; i <= n; i++)  cin >> a[i];
    for(int i = 1; i <= n; i++)  cin >> b[i];  
    for(int i = 1; i <= n; i++)  p[i] = {a[i],b[i]};
    sort(p + 1 , p + n + 1);
    //for(int i = 1; i <= n; i++) cout << p[i].x << " " << p[i].y << endl;
    for(int i = 1; i <= n; i++)
    {
         if(i == 1) 
         {
             if(p[i].x + p[i].y < p[2].x)  ans++;
         }
         else if(i == n)
         {
             if(p[i].x - p[i].y > p[i - 1].x) ans++;
         }
         else  
         {
             if(p[i].x + p[i].y < p[i + 1].x && p[i].x - p[i].y > p[i - 1].x)  ans++;
         }
    }
    cout << ans << endl;
}
    
signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr),cout.tie(nullptr);
    int t  = 1;
    while(t -- ) solve();
    return 0; 
}